from base.base import Base
import page

"""
    编写登录的page
"""


class PageLogin(Base):
    # 输入用户名
    def page_username_input(self):
        self.base_input(page.username, "admin")

    # 输入密码
    def page_password_input(self):
        self.base_input(page.password, 111111)

    # 输入验证码
    def page_code_input(self):
        self.base_input(page.code, 1)

    # 点击登录
    def page_login_click(self):
        self.base_click(page.login_button)

    """
        组装业务方法
    """

    def login(self):
        self.page_username_input()
        self.page_password_input()
        self.page_code_input()
        self.page_login_click()